<?php
 /*******************************************************************************
 * @filename: add.ctp
 *
 * @author: immer_baldos
 *
 * @description: user/add view
 *
 * @history:
 *
 *   VERSION   DATE                   BY          NOTES
 *  ---------------------------------------------------------------
 *     1.0     September 9, 2009     immer        initial bake
 *
 *     2.0     September 21, 2009     immer       hid fields that can be auto
 *                                                generated
 *
 ******************************************************************************/
 ?>
<div class="users form">
<?php echo $form->create('User');?>
	<fieldset>
 		<legend><?php __('Add User');?></legend>
	<?php
		echo $form->input('username');
		echo $form->input('password');
		echo $form->hidden('old_password');
		$myStamp = getdate();
		echo $form->hidden('date_changed',array('type'=>'text','value'=>sprintf("%s-%'02s-%'02s",$myStamp['year'],$myStamp['mon'],$myStamp['mday'])));
        echo $form->input('role', array('options' => array(
            'admin',
            'finance',
            'collector',
            'product officer',
            'sales',
            'customer'
        ), 'default' => '5'));

        echo $form->input('customer_id', array('options' => $customer, 'default' => '0') );
	?>
	</fieldset>
<?php echo $form->end('Submit');?>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('List Users', true), array('action' => 'index'));?></li>
	</ul>
</div>
